package com.fengmi.cms.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.fengmi.cms.Content;
import com.fengmi.cms.mapper.ContentMapper;
import com.fengmi.cms.service.IContentService;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author sujie
 * @since 2022-11-22
 */
@Service
public class ContentServiceImpl extends ServiceImpl<ContentMapper, Content> implements IContentService {

    @Override
    public List<Content> getAllContentsList(Long categoryId) {
        QueryWrapper<Content> query = new QueryWrapper<>();
        query.eq("category_id",categoryId);
        return this.baseMapper.selectList(query);
    }
}
